<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.lisp</title>
<meta name="generator" content="KF5::SyntaxHighlighting (Common Lisp)"/>
</head><body style="color:#1f1c1b"><pre>
<span style="color:#898887;">;; This test file tests kates common lisp highlighting</span>
<span style="color:#898887;">#|</span>
<span style="color:#898887;">multilinecomment :)</span>
<span style="color:#898887;">|#</span>

<span style="color:#0057ae;background-color:#e0e9f8;">;BEGIN region marker</span>

<span style="color:#0057ae;background-color:#e0e9f8;">;END end</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defun</span><span style="color:#644a9b;"> bin-search </span><span style="color:#0000ff;font-weight:bold;">(</span>obj vec<span style="color:#0000ff;font-weight:bold;">)</span>
  <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">let</span> <span style="color:#0000ff;font-weight:bold;">((</span>len <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">length</span> vec<span style="color:#0000ff;font-weight:bold;">)))</span>
    <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">and</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">not</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">zerop</span> len<span style="color:#0000ff;font-weight:bold;">))</span>
         <span style="color:#0000ff;font-weight:bold;">(</span>finder obj vec <span style="color:#b08000;">0</span> <span style="color:#0000ff;font-weight:bold;">(</span>- len <span style="color:#b08000;">1</span><span style="color:#0000ff;font-weight:bold;">)))))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defun</span><span style="color:#644a9b;"> parse-date </span><span style="color:#0000ff;font-weight:bold;">(</span>str<span style="color:#0000ff;font-weight:bold;">)</span>
  <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">let</span> <span style="color:#0000ff;font-weight:bold;">((</span>toks <span style="color:#0000ff;font-weight:bold;">(</span>tokens str #'constituent <span style="color:#b08000;">0</span><span style="color:#0000ff;font-weight:bold;">)))</span>
    <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">list</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">parse-integer</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">first</span> toks<span style="color:#0000ff;font-weight:bold;">))</span>
          <span style="color:#0000ff;font-weight:bold;">(</span>parse-month   <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">second</span> toks<span style="color:#0000ff;font-weight:bold;">))</span>
          <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">parse-integer</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">third</span> toks<span style="color:#0000ff;font-weight:bold;">)))))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defconstant</span><span style="color:#644a9b;"> month-names</span>
  #<span style="color:#0000ff;font-weight:bold;">(</span><span style="color:#bf0303;">&quot;jan&quot;</span> <span style="color:#bf0303;">&quot;feb&quot;</span> <span style="color:#bf0303;">&quot;mar&quot;</span> <span style="color:#bf0303;">&quot;apr&quot;</span> <span style="color:#bf0303;">&quot;may&quot;</span> <span style="color:#bf0303;">&quot;jun&quot;</span>
    <span style="color:#bf0303;">&quot;jul&quot;</span> <span style="color:#bf0303;">&quot;aug&quot;</span> <span style="color:#bf0303;">&quot;sep&quot;</span> <span style="color:#bf0303;">&quot;oct&quot;</span> <span style="color:#bf0303;">&quot;nov&quot;</span> <span style="color:#bf0303;">&quot;dec&quot;</span><span style="color:#0000ff;font-weight:bold;">))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defstruct</span><span style="color:#644a9b;"> buf</span>
  vec <span style="color:#0000ff;font-weight:bold;">(</span>start -1<span style="color:#0000ff;font-weight:bold;">)</span> <span style="color:#0000ff;font-weight:bold;">(</span>used -1<span style="color:#0000ff;font-weight:bold;">)</span> <span style="color:#0000ff;font-weight:bold;">(</span>new -1<span style="color:#0000ff;font-weight:bold;">)</span> <span style="color:#0000ff;font-weight:bold;">(</span>end -1<span style="color:#0000ff;font-weight:bold;">))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defparameter</span><span style="color:#644a9b;"> *words* </span><span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">make-hash-table</span> :size <span style="color:#b08000;">10000</span><span style="color:#0000ff;font-weight:bold;">))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">defmacro</span><span style="color:#644a9b;"> while </span><span style="color:#0000ff;font-weight:bold;">(</span>test &amp;<span style="font-weight:bold;">rest</span> body<span style="color:#0000ff;font-weight:bold;">)</span>
  `<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">do</span> <span style="color:#0000ff;font-weight:bold;">()</span>
       <span style="color:#0000ff;font-weight:bold;">((</span><span style="font-weight:bold;">not</span> ,test<span style="color:#0000ff;font-weight:bold;">))</span>
     ,@body<span style="color:#0000ff;font-weight:bold;">))</span>

<span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">define-modify-macro</span><span style="color:#644a9b;"> append1f </span><span style="color:#0000ff;font-weight:bold;">(</span>val<span style="color:#0000ff;font-weight:bold;">)</span>
  <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">lambda</span> <span style="color:#0000ff;font-weight:bold;">(</span>lst val<span style="color:#0000ff;font-weight:bold;">)</span> <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">append</span> lst <span style="color:#0000ff;font-weight:bold;">(</span><span style="font-weight:bold;">list</span> val<span style="color:#0000ff;font-weight:bold;">))))</span>
</pre></body></html>
